package com.ruoyi.project.beautyflower.repaymentPlan.mapper;

import com.ruoyi.project.beautyflower.repaymentPlan.domain.RepaymentPlan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 还款计划 数据层
 * 
 * @author lxs
 * @date 2018-10-16
 */
public interface RepaymentPlanMapper 
{
	/**
     * 查询还款计划信息
     * 
     * @param id 还款计划ID
     * @return 还款计划信息
     */
	public RepaymentPlan selectRepaymentPlanById(Integer id);
	
	/**
     * 查询还款计划列表
     * 
     * @param repaymentPlan 还款计划信息
     * @return 还款计划集合
     */
	public List<RepaymentPlan> selectRepaymentPlanList(RepaymentPlan repaymentPlan);
	
	/**
     * 新增还款计划
     * 
     * @param repaymentPlan 还款计划信息
     * @return 结果
     */
	public int insertRepaymentPlan(RepaymentPlan repaymentPlan);
	
	/**
     * 修改还款计划
     * 
     * @param repaymentPlan 还款计划信息
     * @return 结果
     */
	public int updateRepaymentPlan(RepaymentPlan repaymentPlan);
	
	/**
     * 删除还款计划
     * 
     * @param id 还款计划ID
     * @return 结果
     */
	public int deleteRepaymentPlanById(Integer id);
	
	/**
     * 批量删除还款计划
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteRepaymentPlanByIds(String[] ids);

	/**
	 * 查询还款计划列表
	 *
	 * @param repaymentPlan 还款计划信息
	 * @return 还款计划集合
	 */
	public List<RepaymentPlan> selectList(RepaymentPlan repaymentPlan);

	/**
	 * 根据订单号及期数查询订单计划
	 * @param orderNumber
	 * @param installmentNo
	 * @return
	 */
	RepaymentPlan selectOrderByListByOrderNumberAndinstallmentNo(@Param("orderNumber") String orderNumber,@Param("installmentNo") String installmentNo);

	/**
	 * 根据订单号查询超期订单计划
	 * @return
	 */
	List<RepaymentPlan> selectOrderByListByOrderNumber(String orderNumber);

	/**
	 * 定时执行任务
	 */
	int scheduled();


	/**
	 * 定时查询即将到期的还款计划进行提醒
	 * @return
	 */
	List<RepaymentPlan> selectRepaymentPlanListByDudate();


}